/*
 * Copyright the original author or authors.
 * 
 * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *	  http://www.mozilla.org/MPL/MPL-1.1.html
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.googlecode.milib.dbg.model.content {
	import com.googlecode.milib.animation.static_.MLEase;
	import com.googlecode.milib.dbg.MLDBG;
	import com.googlecode.milib.dbg.model.content.MLDBGValuesListModel;
	import com.googlecode.milib.service.singleton.LinksFromMLTextFieldGlobalBroadcaster;
	import com.googlecode.milib.vo.MLEventInfo;

	/**
	 * @author Marek Brun
	 */
	public class MLDBGEasesList extends MLDBGValuesListModel {
		
		private static var instance:MLDBGEasesList;
		private var eases:Array;
		private var links:LinksFromMLTextFieldGlobalBroadcaster;
		private var lastEase:MLEase;

		
		public function MLDBGEasesList(access:Private) {
			super(false);
			eases=[];
			//addValue('<U><A HREF="event:easesClippboardPaste">Paste eases create AS to clippboard</A></U>', new MLEase());
//			links=LinksFromMLTextFieldGlobalBroadcaster.getInstance();
//			links.addListener(this);
			//TODO
		}
		
		public function regEase(ease:MLEase):void {
			lastEase=ease;
			addValue(MLDBG.getInstance().getValueLinked(ease, ease.name));
			eases.push(ease);
		}
		
		public function getEases():Array {
			return eases.concat();
		}
		
		public static function getInstance():MLDBGEasesList {
			if(instance) { return instance; }
			else{ instance=new MLDBGEasesList(null); return instance; }
		}
		
//********************************************************************************************
//		events for MLDBGEasesList
//********************************************************************************************
		override public function onEvent(ev:MLEventInfo):void {
			super.onEvent(ev);
			switch(ev.hero){
				case links:
					switch(ev.event) {
						case links.event_Link:
							
						break;
					}
				break;
			}
		}
		
	}
}
internal class Private {}